package com.fand.manager.model.userrole;

import java.io.Serializable;
import java.util.List;

import com.fand.manager.model.role.SysRolePostDTO;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * Author: zhangjiabin
 * Email: javaboyok@163.com
 * CreateDate: 2021/6/8
 * Version: 1.0
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
public class SysUserRolePostDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "用户id")
    private Long userId;

    @ApiModelProperty(value = "0:授权，1：取消授权")
    private int type;

    @ApiModelProperty(value = "变动列表")
    private List<PostDTO> userRoles;

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class PostDTO {

        @ApiModelProperty(value = "角色主键")
        private Long   value;
        @ApiModelProperty(value = "角色名称")
        private String title;
    }
}
